package dp.onClass.class3.exer03;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        int[] merge = new int[n - 1];
        for (int i = 0; i < n - 1; i++) {
            merge[i] = sc.nextInt();
        }
        int[][] dp = new int[n][3];
        dp[0][0] = arr[0];
        dp[0][1] = Integer.MAX_VALUE;
        dp[0][2] = merge[0];
        for (int i = 1; i < n - 1; i++) {
            dp[i][0] = arr[i] + Math.min(dp[i - 1][0], dp[i - 1][1]);
            dp[i][1] = dp[i - 1][2];
            dp[i][2] = merge[i] + Math.min(dp[i - 1][0], dp[i - 1][1]);
        }
        dp[n - 1][0] = arr[n - 1] + Math.min(dp[n - 2][0], dp[n - 2][1]);
        dp[n - 1][1] = dp[n - 2][2];
        dp[n - 1][2] = Integer.MAX_VALUE;
        System.out.println(Math.min(dp[n - 1][0], dp[n - 1][1]));
    }
}
